import Vue from 'vue'
import VueRouter from 'vue-router'



Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login',
    hidden: true
  },
 
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/loginPage.vue'),
    hidden: true
  },
  {
    path: '/system',
    name: 'System',
    component: () => import('../views/systemPage.vue'),
    hidden: true,
    children: [
      {
        path: 'home',
        url: '/system/home',
        name: '首页',
        component: () => import('../views/homePage.vue'),
        icon: 'el-icon-s-home'
      },
      {
        path: 'project',
        url: '/system/project',
        name: '项目管理',
        component: () => import('../views/projectPage.vue'),
        icon: "el-icon-document"
      },
      {
        path: 'person',
        url: '/system/person',
        name: '人员管理',
        component: () => import('../views/personPage.vue'),
        icon: 'el-icon-user-solid'
      },
      {
        path: 'group',
        url: '/system/group',
        name: '团队管理',
        component: () => import('../views/groupPage.vue'),
        icon: 'el-icon-connection'
      },
      {
        path: 'role',
        url: '/system/role',
        name: '角色管理',
        component: () => import('../views/rolePage.vue'),
        icon: 'el-icon-s-custom'
      }
    ]
  }
]

const router = new VueRouter({
  base: process.env.BASE_URL,
  routes
})

export default router
